package chapter05.helloworld;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

import java.lang.reflect.Method;

public class AgentDecorator implements MethodInterceptor {
    public Object invoke(MethodInvocation invocation) throws Throwable {
        System.out.println("Decorator Speak method: Bond");
        Object retVal = invocation.proceed();
        System.out.println("!");
        return retVal;
    }
}
